The phrase "to cook the lentils" means to prepare lentils by boiling or simmering them until they are soft and ready to eat.